Registers a specified version of a given e-learning package (that's stored in a SharePoint document library) in the SharePointPackageStore associated with this SharePoint Learning Kit store, and returns its PackageItemIdentifier and content warnings. If that version -- with the same last-modified date/time -- is already registered, its information is returned rather than re-registering the package. Uses an MLC SharePoint location string to locate the package.
Parent Type: SlkStore
Namespace: Microsoft.SharePointLearningKit
Assembly: Microsoft.SharePointLearningKit.dll
| C# |
|
public void RegisterPackage ( ) |
location
The MLC SharePoint location string that refers to the e-learning package to register. Use SharePointPackageStore.GetLocation to construct this string.
packageId
Where the returned PackageItemIdentifier is stored.
warnings
Where the returned warnings are stored. This XML consists of a root "<Warnings>" element containing one "<Warning>" element per warning, each of which contains the text of the warning as the content of the element plus the following attributes: the "Code" attribute contains the warning's ValidationResultCode, and the "Type" attribute contains the warning's type, either "Error" or "Warning". warnings is set to null if there are no warnings.
| Exception type | Condition |
| ArgumentException | The syntax of location is incorrect. |
| FileNotFoundException | location refers to a file that does not exist. |
| SafeToDisplayException | An error occurred that can be displayed to a browser user. Possible cause: the package has problems severe enough to prevent it from being assignable within SharePoint Learning Kit. |
| UnauthorizedAccessException | location refers to a file that the user does not have access to. |
If the package is valid, warnings is set to null. If the package is not completely valid, but is valid enough to be assigned within SharePoint Learning Kit, warnings is set to warnings about the package. If the package has problems severe enough to prevent it from being assignable within SLK, a SafeToDisplayException is thrown.
Security: This operation fails if the current user doesn't have access to the package.